package com.springboot.learning.framework.config;
 
import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.plugins.PerformanceInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
 
/**
 * @version: V1.0
 * @author: 
 * @className: MybatisPlusConfig
 * @packageName: com.springboot.learning.conf
 * @description: Mybatis-plus配置类
 * @data: 2018-09-17 23:03
 **/
@Configuration
@MapperScan("com.springboot.learning.project.mapper")
public class MybatisPlusConfig {
    /**
     * mybatis-plus SQL执行效率插件【生产环境可以关闭】
     */
    @Bean
    public PerformanceInterceptor performanceInterceptor() {
        return new PerformanceInterceptor();
    }
 
    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}

